import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        int val = queue.poll();
        System.out.println(val);
    }

    public static void main2(String[] args) {
        MyQueue queue = new MyQueue();
        queue.offer(1);
        queue.offer(2);
        int val = queue.poll();
        System.out.println(val);
    }

    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println( );
        binaryTree.inOrder(root);
        System.out.println( );
        binaryTree.postOrder(root);
        System.out.println("节点的个数：");
        System.out.println(binaryTree.size(root));
        System.out.println("叶子节点的个数：");
        System.out.println(binaryTree.getLeafNodeCount(root));
        System.out.println(binaryTree.getLeafNodeCount2(root));

    }
}
